namespace SPI.AgentServer.Services.Execution;

public interface IDatabaseExecutor
{
    Task<QueryExecutionResult> ExecuteQueryAsync(string sql, string? databaseName = null, CancellationToken cancellationToken = default);
    Task<bool> TestConnectionAsync(string databaseName, CancellationToken cancellationToken = default);
}

public class QueryExecutionResult
{
    public bool Success { get; set; }
    public object? Data { get; set; }
    public int RowCount { get; set; }
    public long ExecutionTimeMs { get; set; }
    public string? Error { get; set; }
}
